home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / line.cpp < prev    next >
C/C++ Source or Header  |  1994-10-10  |  938b  |  35 lines

  1. #include "line.h"
  2. #include "colors.h"
  3. #include "patterns.h"
  4. #include "khbgi.h"
  5.  
  6. void Line::outtextxy(loc xy, char* text, int pat)
  7.     {
  8.     settextstyle(DEFAULT_FONT, HORIZ_DIR, 1);
  9.     settextjustify(LEFT_TEXT, TOP_TEXT);
  10.     bar(xy.X, xy.Y, xy.X + textwidth(text),
  11.         xy.Y + pScreenSet->standart_height + 1,
  12.         pColorSet->colors.HDR_BAK_COLOR,
  13.     pColorSet->colors.FILL_COLOR, (uchar*)pattern[pat]);
  14.     if(text)
  15.         {
  16.         setcolor(pColorSet->colors.HDR_ATTR_COLOR);
  17.     outtextat(loc(xy.X, xy.Y), text);
  18.         }
  19.     }
  20. /////////////////////////
  21. /*
  22. void main()
  23.     {
  24.     if(!init_KNOW_HOW())
  25.         return;
  26.     Line l;
  27.     l.outtextxy(loc(10, 10), "Hello, World !", 16);
  28.     pColorSet->loadColorSet(1);
  29.     l.outtextxy(loc(10, 10), "Hello, World !", 16);
  30.     pColorSet->loadColorSet(2);
  31.     l.outtextxy(loc(10, 10), "Hello, World !", 16);
  32.     close_KNOW_HOW();
  33.     closegraph();
  34.     }
  35. */